
// 画布配置项
export const canvasFields = ["canvasWidth", "canvasHeight", "canvasFps"];
// 文本配置项
export const textBasicFields = [
    "textContent",
    "textStartTime",
    "textDuration",
    "fontSize",
    "isBold",
    "isItalic",
    "isUnderline",
    "textOpacity",
    "textAlign",
    "letterSpacing",
    "lineSpacing",
];
// 文本边框配置相关字段
export const textBorderFields = ["borderWidth", "borderOpacity"];
// 文本背景配置相关字段
export const textBackgroundFields = [
    "backgroundStyle",
    "backgroundOpacity",
    "backgroundWidth",
    "backgroundHeight",
    "horizontalOffset",
    "verticalOffset",
    "roundRadius",
];
// 文本动画配置相关字段
export const textAnimationFields = ["introDuration", "outroDuration"];


export function hasSomeFieldsChanged(
    changedFields: { name: string[] }[],
    fields: string[]
): boolean {
    const changedFieldNames = changedFields.map(
        (field: any) => field.name[0],
    );
    return changedFieldNames.some((name: string) => fields.includes(name));
}